﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Media.Animation;
using System.Windows.Navigation;
using System.Windows.Shapes;
using System.IO;

namespace LiveWriterBackupWPF
{
	public partial class canAboutControl
	{
		public canAboutControl()
		{
			this.InitializeComponent();
            txtbVersionDetails.Text = WLMisc.AboutInfo;
		}

        internal frmMain MainForm { get; set; }

        #region canAbout Methods
        private void btnCloseAbout_Click(object sender, RoutedEventArgs e)
        {
            Storyboard abouttomain = (Storyboard)MainForm.Resources["HideAbout"];
            abouttomain.Begin();
        }

        private void imgDonate_MouseUp(object sender, MouseButtonEventArgs e)
        {
            System.Diagnostics.Process.Start("https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=3289441");
        }

        private void linklabelBlogLink_Click(object sender, RoutedEventArgs e)
        {
            System.Diagnostics.Process.Start("http://scottisafooldev.spaces.live.com/");
        }

        private void linklabelGiveFeedback_Click(object sender, RoutedEventArgs e)
        {
            System.Diagnostics.Process.Start("http://www.codeplex.com/WLWBackup/WorkItem/List.aspx");
        }

        private void linklabelSupport_Click(object sender, RoutedEventArgs e)
        {
            System.Diagnostics.Process.Start("http://www.codeplex.com/WLWBackup/Thread/List.aspx");
        }

        private void linklabelShowLogFile_Click(object sender, RoutedEventArgs e)
        {
            string debugFilePath = Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData) + "\\Windows Live Writer Backup";
            System.Diagnostics.Process.Start(debugFilePath);
        }
        #endregion       
	}
}